<?php 

include 'D:/dingjiangbbs/common/home.php';

//屏蔽notice错误
error_reporting(E_ALL ^ E_NOTICE);

//接收post值
//var_dump($_POST);

//判断id数组是否传递成功
if (empty($_POST['$arr'])) {

	exit('当前未勾选内容,请勾选选项');
}

//接收id数组
$arr  = $_POST['$arr'];
//var_dump($arr);

//分割id数组
$id = implode(',',$arr);
//var_dump($id);

//修改字段isdel,隐藏放入回收站
$table  = DB_TABLE_DETAIL;
$data   = [
	'isdel' => 1	
];
$where  = "id in ($id)";
$res    = update($link,$table,$data,$where);
//var_dump($res);

//输出,跳转页面
if (!$res) {
	echo '<a href="'.WEB_SITE.'admin_cg.php?bighead=4&cg_number=7">操作失败</a>';
}

echo '<a href="'.WEB_SITE.'admin_cg.php?bighead=4&cg_number=7">帖子成功放入回收站</a>';

mysqli_close($link);